package com.neusoft.ehr.controller;

import com.neusoft.ehr.service.DeptService;
import com.neusoft.entity.Dept;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
@CrossOrigin("*")
@RestController
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    DeptService deptService;
    @GetMapping("/get/{mgr}")
    public List<Dept> f1(@PathVariable("mgr") int mgr ){
        return  deptService.getbymgr(mgr);
    }
}
